<?php

namespace addons\comments\validate;

class CommentsPostValidate extends  \think\Validate
{
    protected $rule = [
        'topic_id'   =>  'require',
        'topic_type' =>  'require',
        'content'    =>  'require',
        'from_uid'   =>  'gt:0',
    ];

    protected $message  =   [
        'topic_id.require' => '评论主题不能为空',
        'topic_type.require'     => '评论主题类型不能为空',
        'content.require'   => '评论内容不能为空',
        'from_uid.gt'  => '请登陆后进行评论',
    ];

}